package demo.demo04;

public class 数组max {
    public static void main(String[] args) {
        int[] array = {1, 2, 3, 4, 5, 6, 7, 8};
        int min = array[0];
        for (int i = 1; i <= array.length - 1; i++) {
            if (array[i] < min) {
                min = array[i];
            }
        }
        System.out.println("最小值为：" + min);
        System.out.println("=============");

    }
}
